package com.ruicar.afs.cloud.image.store.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.common.core.feign.AfsFeignFormSupport;
import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @description: 影像存储服务器
 * @author: fangchenliang
 * @date: 2020/6/5 11:48
 */
@FeignClient(name = "tianjingservice", url = "${com.greatwall.systems.fastdfs.tianjingurl}", configuration = AfsFeignFormSupport.class)
public interface TianJinPlaceApiFeign {
    /**
     * @Description:
     * @Author: fangchenliang
     * @Date: 2020/6/16 22:46
     * @Param: [md5, sceneid]
     * @Return: com.alibaba.fastjson.JSONObject
     */
    @ApiOperation("下载影像文件")
    @GetMapping(value = "/S120017/v2/download")
    @AfsFeignClear(true)
    byte[] downFile(@RequestParam("md5") String md5,
                    @RequestParam("downloadsceneid") String downloadsceneid,
                    @RequestParam("filename") String filename,
                    @RequestParam("is_view") String is_view,
                    @RequestParam("is_thumb") String is_thumb,
                    @RequestHeader Map<String, String> headers);
}
